package com.matt.foundation.constant;

import lombok.Setter;

public class PermissionConstant {

    public static final String TEACH_COMPLAINT_DELETE = "teach::complaint::delete"; //                    投诉列表删除
    public static final String TEACH_COMPLAINT_REPLY = "teach::complaint::reply"; //                     回复投诉

    public static final String TEACH_CHECKRECORD_REPORT = "teach::check_record::report"; //                 晨检报告
    public static final String TEACH_CHECKRECORD_ADD = "teach::check_record::add"; //                 晨检报告



    public static final String TEACH_SYSTEM_SETTING = "teach::system::setting"; //                      系统设置

    public static final String TEACH_NURSERY_SCHEDULE_DELETE = "teach::nursery::schedule_template::delete"; //   课表模板删除

    public static final String TEACH_NURSERY_COURSEAUDIT_SETTING = "teach::nursery::course_audit::setting"; //       备课审核配置
    public static final String TEACH_NURSERY_COURSEAUDIT_ACTION = "teach::nursery::course_audit::action";  //       备课审核配置

    public static final String TEACH_CLASSES_FULL = "teach::classes::full_list"; //                   园长托班班级列表
    public static final String TEACH_CLASSES_MYLIST = "teach::classes::my_list"; //                     我的班级
    public static final String TEACH_CLASSES_DOCTOR = "teach::classes::doctor_list"; //                 医生我的班级
    public static final String TEACH_CLASSES_SALES = "teach::classes::sales_list"; //                销售的班级权限

    public static final String TEACH_NOTICE_FULL = "teach::notice::full_list"; //                 教务系统通知完整列表

    public static final String TEACH_ROLE_LIST = "setting::authority::role"; //                 增加用户
    public static final String TEACH_ROLE_ADD = "teach::role::add"; //                 增加用户
    public static final String TEACH_ROLE_DEL = "teach::role::delete"; //                 增加用户
    public static final String TEACH_ROLE_EDIT = "teach::role::edit"; //                 增加用户

    public static final String TEACH_STAFF_LIST = "teach::staff::list"; //                 增加用户
    public static final String TEACH_STAFF_ADD = "teach::staff::add"; //                 增加用户
    public static final String TEACH_STAFF_DEL = "teach::staff::delete"; //                 增加用户
    public static final String TEACH_STAFF_EDIT = "teach::staff::edit"; //                 增加用户

    public static final String CRM_SALESFAQ_UPDATE = "crm::sales_faq::update"; //                      SalesFAQ对象编辑
    public static final String CRM_SALESFAQ_AUDITY = "crm::sales_faq::auditylist"; //                  SalesFAQ审核列表
    public static final String CRM_LEADS_LIST = "crm::leads::list"; //                  CRM线索表
    public static final String API_Thermometer = "api::thermometer::thermometer"; //                  API温度硬件
    public static final String API_Thermometer1 = "api::thermometer::getThermometer"; //                  API温度硬件
    public static final String API_Weather = "api::weather::getWeather"; //                 获取天气接口





    public enum Role{
        ADMIN("ROLE_ADMIN", "管理员"),
        GARDEN_LEADER("ROLE_GARDEN_LEADER", "园长"),
        EXECUTE_LEADER("ROLE_EXECUTE_LEADER", "执行园长"),
        TEACHER("ROLE_TEACHER", "老师"),
        DOCTOR("ROLE_DOCTOR", "医生"),
        RESEARCHER("ROLE_RESEARCHER", "研究员"),
        NURSE("ROLE_NURSE","保育员"),
        ;

        @Setter
        private String code;

        @Setter
        private String value;

        Role(String code, String value){
            this.code = code;
            this.value = value;
        }

        public String codeOf(){
            return code;
        }

        public String valueOf(){
            return value;
        }

        public Role get(String code){
            for (Role role : values()) {
                if (role.codeOf() == code)
                    return role;
            }
            return null;
        }
    }

}
